package com.wanwu.channel.dao.entity;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.lang.reflect.Field;
import java.util.Date;

public class ChannelClearSubEntity extends BaseEntity {
    private String clearSubNo;

    private String channelNo;

    private String clearDetailNo;

    private Long clearAmount;

    private Long discounts;

    private Long taxes;

    private String userName;

    private Integer idType;

    private String idCard;

    private String goodsCategory;

    private String goodsDetail;

    private Integer goodsNum;

    private String delivery;

    private String deliveryNo;

    private Date tradeTime;

    private Date createTime;

    private Date updateTime;

    private String ext1;

    private String extJson;

    public String getClearSubNo() {
        return clearSubNo;
    }

    public void setClearSubNo(String clearSubNo) {
        this.clearSubNo = clearSubNo == null ? null : clearSubNo.trim();
    }

    public String getChannelNo() {
        return channelNo;
    }

    public void setChannelNo(String channelNo) {
        this.channelNo = channelNo == null ? null : channelNo.trim();
    }

    public String getClearDetailNo() {
        return clearDetailNo;
    }

    public void setClearDetailNo(String clearDetailNo) {
        this.clearDetailNo = clearDetailNo == null ? null : clearDetailNo.trim();
    }

    public Long getClearAmount() {
        return clearAmount;
    }

    public void setClearAmount(Long clearAmount) {
        this.clearAmount = clearAmount;
    }

    public Long getDiscounts() {
        return discounts;
    }

    public void setDiscounts(Long discounts) {
        this.discounts = discounts;
    }

    public Long getTaxes() {
        return taxes;
    }

    public void setTaxes(Long taxes) {
        this.taxes = taxes;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public Integer getIdType() {
        return idType;
    }

    public void setIdType(Integer idType) {
        this.idType = idType;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard == null ? null : idCard.trim();
    }

    public String getGoodsCategory() {
        return goodsCategory;
    }

    public void setGoodsCategory(String goodsCategory) {
        this.goodsCategory = goodsCategory == null ? null : goodsCategory.trim();
    }

    public String getGoodsDetail() {
        return goodsDetail;
    }

    public void setGoodsDetail(String goodsDetail) {
        this.goodsDetail = goodsDetail == null ? null : goodsDetail.trim();
    }

    public Integer getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(Integer goodsNum) {
        this.goodsNum = goodsNum;
    }

    public String getDelivery() {
        return delivery;
    }

    public void setDelivery(String delivery) {
        this.delivery = delivery == null ? null : delivery.trim();
    }

    public String getDeliveryNo() {
        return deliveryNo;
    }

    public void setDeliveryNo(String deliveryNo) {
        this.deliveryNo = deliveryNo == null ? null : deliveryNo.trim();
    }

    public Date getTradeTime() {
        return tradeTime;
    }

    public void setTradeTime(Date tradeTime) {
        this.tradeTime = tradeTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getExt1() {
        return ext1;
    }

    public void setExt1(String ext1) {
        this.ext1 = ext1 == null ? null : ext1.trim();
    }

    public String getExtJson() {
        return extJson;
    }

    public void setExtJson(String extJson) {
        this.extJson = extJson == null ? null : extJson.trim();
    }

    /**
     * 敏感数据过滤
     * @return
     */
    @Override
    public String toString() {
        return (new ReflectionToStringBuilder(this, ToStringStyle.JSON_STYLE) {
            @Override
            protected boolean accept(Field f) {
                return super.accept(f) && !f.getName().equals("userName") && !f.getName().equals("idCard");
            }
        }).toString();
    }
}